package com.hdoit.kylin.web.studentManager.modelconfig;

import com.hdoit.kylin.web.studentManager.providers.MidCheckStateProvider;
import com.hdoit.kylin.web.studentManager.providers.StudentOwnProvider;
import com.hdoit.kylin.web.studentManager.providers.TeacherOwnProvider;
import com.tennetcn.component.attribute.DateTimeAttribute;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.DropDownListAttribute;
import com.tennetcn.component.attribute.RequiredAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;

/**
 * @author anshengqiang
 * @email
 * @createtime 2017年07月26日 11:25:15
 * @comment
 */
public class MidCheckConfig extends ModelMetadataAttributeConfiguration {
	public MidCheckConfig() {
		this.setProperty("checkDate")
				.hasAttribute(new DisplayNameAttribute("检查时间"))
				.hasAttribute(new RequiredAttribute("检查时间为必填项"))
				.hasAttribute(new DateTimeAttribute());
		
		this.setProperty("checkedId")
				.hasAttribute(new DisplayNameAttribute("被检查人"))
				.hasAttribute(new RequiredAttribute("被检查人为必填项"))
				.hasAttribute(new DropDownListAttribute(new StudentOwnProvider()));
		
		this.setProperty("status")
				.hasAttribute(new DisplayNameAttribute("检查状态"))
				.hasAttribute(new RequiredAttribute("检查状态为必填项"))
				.hasAttribute(new DropDownListAttribute(new MidCheckStateProvider()));

		this.setProperty("fileAddress")
			.hasAttribute(new DisplayNameAttribute("检查的文件地址"));
		
		this.setProperty("checkId")
				.hasAttribute(new DisplayNameAttribute("检查人id"))
				.hasAttribute(new RequiredAttribute("检查人id为必填项"))
				.hasAttribute(new DropDownListAttribute(new TeacherOwnProvider()));
	}
}